﻿namespace Civic.Platform.Teach.Dao.Base
{
    public static class DBConnetionStrings
    {
        public static string LG = AppConfigurtaionServices.Configuration["ConnectionStrings:orcl_ORACLE_Smes"];
        public static string VOD = AppConfigurtaionServices.Configuration["ConnectionStrings:orcl_ORACLE_VOD"];
        public static string LES = AppConfigurtaionServices.Configuration["ConnectionStrings:orcl_ORACLE"];
        public static string HMES = AppConfigurtaionServices.Configuration["ConnectionStrings:orcl_ORACLE_hmes"];
        public static string EAF = AppConfigurtaionServices.Configuration["ConnectionStrings:orcl_ORACLE_bof"];
        public static string EMES = AppConfigurtaionServices.Configuration["ConnectionStrings:orcl_ORACLE_emes"];

        public static string SelectConnection(object userID)
        {
            return userID switch
            {
                DBUserIDSelect.UserId.LG => LG,
                DBUserIDSelect.UserId.CX => LES,
                DBUserIDSelect.UserId.HMES => HMES,
                DBUserIDSelect.UserId.EMES => EMES,
                _ => LG,
            };
        }
    }
}